<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <ui:composition template="index.xhtml">
        <ui:define name="body">
            <h:form id="form" acceptcharset="utf-8">
                <p:growl id="msg" life="3000" />


                <h:panelGrid columns="2" style="width: 100%;">
                    <h:panelGrid style="width: 200px;">
                        <p:menu>  
                            <p:submenu label="Questionário">  
                                <p:menuitem value="Novo" style="font-size: 13px;" actionListener="#{managerRedirect.redirect('createQuestionnaire.xhtml')}"   update="@form" icon="ui-icon-circle-plus" />  
                                <p:menuitem value="Pesquisar"  style="font-size: 13px;" actionListener="#{managerRedirect.redirect('searchQuestionnaire.xhtml')}" update="@form" icon="ui-icon-circle-zoomout"/>  
                                <p:menuitem value="Visualizar"  style="font-size: 13px;" actionListener="#{managerRedirect.redirect('viewQuestionnaire.xhtml')}"  update="@form" icon="ui-icon-info"/>  
                            </p:submenu>  
                        </p:menu>
                    </h:panelGrid>
                    <h:panelGrid columns="1">
                        <p:carousel numVisible="1"
                                    value="#{managerSearchQuestionnaire.lstQuestionnaires()}"
                                    effect="easeInStrong" 
                                    circular="true" 
                                    vertical="true"
                                    effectDuration="700" 
                                    itemStyle="height:90px;width:500px;"
                                    headerText="Questionários"
                                    var="q">

                            <table style="width: 100%;">
                                <tbody>
                                    <tr style="background:#FFFFFF; height: 25px;">
                                        <td>
                                            <p:outputLabel value="Título" style="font-weight: bold" />
                                        </td>
                                    </tr>
                                    <tr style="background:#F1F2E9; height: 30px;">
                                        <td>
                                            <p:outputLabel value="#{q.titulo}"  />
                                        </td>
                                        <td style="width: 70px;">
                                             <p:commandButton icon="ui-icon-help" style="float: right" actionListener="#{managerEditCategory.addIssues(q)}" title="Adicionar Perguntas" />
                                            <p:commandButton icon="ui-icon-circle-zoomin" style="float: right" actionListener="#{managerEditCategory.viewIssues(q)}" title="Visualizar Questionário" />
                                        </td>
                                    </tr>

                                </tbody>
                            </table>

                        </p:carousel>

                    </h:panelGrid>
                </h:panelGrid>
            </h:form>
        </ui:define>
    </ui:composition>
</html>